package com.szl.yeb.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.szl.yeb.entity.Role;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * (Menu)表实体类
 *
 * @author szl
 * @since 2022-08-24 16:21:25
 */
@ApiModel("MenuDto")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_menu")
public class MenuDto implements Serializable {

    private static final long serialVersionUID = 1L;

    //id
    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //url
    @ApiModelProperty("url")
    private String url;
    //path
    @ApiModelProperty("path")
    private String path;
    //组件
    @ApiModelProperty("组件")
    private String component;
    //菜单名
    @ApiModelProperty("菜单名")
    private String name;
    //图标
    @ApiModelProperty("图标")
    private String iconCls;
    //是否保持激活
    @ApiModelProperty("是否保持激活")
    private Integer keepAlive;
    //是否要求权限
    @ApiModelProperty("是否要求权限")
    private Integer requireAuth;
    //父id
    @ApiModelProperty("父id")
    private Integer parentId;
    //是否启用
    @ApiModelProperty("是否启用")
    private Integer enabled;
    //是否是父菜单
    @ApiModelProperty("是否是父菜单")
    private Boolean isParent;
    //子菜单
    @ApiModelProperty("子菜单")
    @TableField(exist = false)
    private List<MenuDto> children;
    //所需角色
    @ApiModelProperty("所需角色")
    @TableField(exist = false)
    private List<Role> roles;
    //旧父菜单id
    @ApiModelProperty("旧父菜单id")
    @TableField(exist = false)
    private Integer oldParentId;

}

